package org.dtrd.modules.flup.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.flup.entity.bean.FlupEvaluation;

import java.util.Date;


/**
 * <p>
 * 患者复诊评价
 * </p>
 *
 * @author QR
 * @since 2021-12-23
 */
@Getter
@Setter
@TableName("dtrd_ent_rd_flup_evaluation")
public class DtrdEntRdFlupEvaluation {

    @TableId(value = "data_id", type = IdType.AUTO)
    private Integer dataId;

    /**
     * 复诊记录id
     */
    @TableField("flup_record_id")
    private Integer flupRecordId;

    /**
     * 服务评价, 等级1~5
     */
    @TableField("service_evaluation")
    private Integer serviceEvaluation;

    /**
     * 舒适度评价, 等级1~5
     */
    @TableField("comfort_evaluation")
    private Integer comfortEvaluation;

    /**
     * 设备评价, 等级1~5
     */
    @TableField("equipment_evaluation")
    private Integer equipmentEvaluation;

    /**
     * 其他建议
     */
    @TableField("other_suggest")
    private String otherSuggest;

    @TableField("create_time")
    private Date createTime;

    @TableField("is_del")
    @TableLogic
    private Integer isDel;

    public DtrdEntRdFlupEvaluation parseFromDTO(FlupEvaluation dto) {
        flupRecordId = dto.getFlupId();
        serviceEvaluation = dto.getServiceEvaluation();
        comfortEvaluation = dto.getComfortEvaluation();
        equipmentEvaluation = dto.getEquipmentEvaluation();
        otherSuggest = dto.getOtherSuggest();
        return this;
    }

    public DtrdEntRdFlupEvaluation init() {
        createTime = new Date();
        isDel = 0;
        return this;
    }


}
